package io.adrainty.bolee.framework.commons.basic;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * @author AdRainty
 * @version V1.0.0
 * @since 2025/8/11 下午8:37
 */

@Data
@Builder
@Schema(description = "树形结构")
@NoArgsConstructor
@AllArgsConstructor
public class TreeItemDTO implements Serializable {
    
    @Serial
    private static final long serialVersionUID = -6871146768402592468L;

    @Schema(description = "节点ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    public String id;

    @Schema(description = "节点父亲ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    public String parentId;

    @Schema(description = "显示内容")
    public String label;

    @Schema(description = "是否选择")
    public Boolean isChecked;

    @Schema(description = "显示内容")
    public String systemCode;

    @Schema(description = "是否叶子节点")
    public String isLeaf;

    @Schema(description = "显示内容")
    public List<TreeItemDTO> children;
    
}
